import { useLocation } from "@umijs/max";
import { App, ConfigProvider } from "antd";
import zhCN from 'antd/es/locale/zh_CN';
import Login from "./Login";
import Workbench from "./Workbench";

export default function (){
  const {pathname} = useLocation()

  return <ConfigProvider locale={zhCN}>
    <App>
      {pathname.startsWith('/login') ? <Login /> : <Workbench />}
    </App>
  </ConfigProvider>
}
